﻿using RpcModel;
using RpcSync.Collect;
using RpcSync.Collect.Model;
using RpcSync.Service.Interface;

namespace RpcSync.Service.Broadcast
{
    /// <summary>
    /// 加载区域所有节点
    /// </summary>
    [RpcClient.Attr.UnityName("ALL")]
    internal class LoadALLNode : IInitBroadcast
    {
        private IRemoteServerCollect _Server;
        public LoadALLNode(IRemoteServerCollect server)
        {
            _Server = server;
        }
        public void InitBroadcastBody(BroadcastMsg msg, MsgSource source, ref BroadcastBody body)
        {
            body.ServerId = this._Server.GetAllServer(msg.RegionId);
        }
    }
}
